package com.guanyong.dao;

import com.guanyong.model.MessageReadlogModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by mxk on 2017/6/6.
 */
public interface IMessageReadlogDaoMapper {

    @Select("SELECT * FROM t_ad_messagereadlog  where f_id=#{fId}")
    @ResultMap("MessageReadlogResultMap")
    MessageReadlogModel selectByPrimaryKey(Integer fId);


    @Select("SELECT * FROM t_ad_messagereadlog WHERE f_userid=#{userid} AND f_messageid=#{msgid}")
    @ResultMap("MessageReadlogResultMap")
    MessageReadlogModel selectByUseridMsgId(@Param("userid") String  userid,@Param("msgid")
                                            Integer msgid);


    int insert(@Param(value = "record") MessageReadlogModel record);

    int update(@Param(value = "record") MessageReadlogModel record);
}
